#ifndef MAPWIDGET_H
#define MAPWIDGET_H

#include <QWidget>
#include <QGraphicsLineItem>

#include "gamemap.h"

namespace Ui {
class MapWidget;
}

class MapWidget : public QWidget
{
    Q_OBJECT

    //QList<QGraphicsLineItem*> _trace;
    
public:
    explicit MapWidget(QWidget *parent = 0);
    void update(GameMap* map, MapMode mode = NORMAL);
    void target(int r1, int c1, int r2, int c2, QColor c = Qt::green);

    void resizeEvent(QResizeEvent *);

    ~MapWidget();

private:
    Ui::MapWidget *ui;
};

#endif // MAPWIDGET_H
